<div class="col-sm-12 mt20">

    <div class="panel panel-default">
        <div class="panel-body" ng-keyup="myKeyup($event)">
            <div class="col-sm-3">
                <div class="input-group">
                    <span class="input-group-addon">选择产品</span>
                    <ui-select ng-model="pageInfo.product" theme="bootstrap">
                        <ui-select-match placeholder="产品...">{{$select.selected.product_name}}</ui-select-match>
                        <ui-select-choices repeat="item in noColumnProductList | filter: $select.search">
                            <span ng-bind-html="item.product_name | highlight: $select.search"></span>
                            【
                            <span ng-bind-html="item.product_code | highlight: $select.search"></span>】
                        </ui-select-choices>
                    </ui-select>
                </div>
            </div>
            <div class="col-sm-3">
                <div class="input-group">
                    <span class="input-group-addon">排序因子</span>
                    <input type="number" class="form-control" placeholder="排序因子(不填为0)" ng-model="pageInfo.asort">
                </div>
            </div>
            <div class="col-sm-2">
                <button class="btn btn-info search btn-block" ng-click="save()">添加产品</button>
            </div>
            <div class="col-sm-2">
            </div>
            <div class="col-sm-2">
            </div>
            <div class="col-sm-2">
            </div>
        </div>

        <div class="panel-body">
            <table class="table table-striped table-bordered dataTable table-condensed tree_table" style="table-layout:fixed">
                <thead>
                    <tr>
                        <th class="col-md-1 text-center">产品名称</th>
                        <th class="col-md-1 text-center">景区名称</th>
                        <th class="col-md-1 text-center">排序</th>
                        <th class="col-md-1 text-center">操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="bean in columnProductList">
                        <td class="text-center">{{bean.product_name}}</td>
                        <td class="text-center">{{bean.product_code}}</td>
                        <td class="text-center">
                            <span ng-if="bean.update_state">{{bean.asort}}</span>
                          <input type="number" class="form-control" placeholder="排序因子(不填为0)" ng-model="bean.asort" ng-if="!bean.update_state">
                        </td>
                        <td class="text-center">
                            <button type="button" class="btn btn-info btn-xs" ng-click="update(bean)" ng-if="bean.update_state">修改</button>
                            <button type="button" class="btn btn-success btn-xs" ng-click="saveone(bean)" ng-if="!bean.update_state">保存</button>
                            <button type="button" class="btn btn-info btn-xs" ng-click="delete($index)">删除</button>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>

    </div>
</div>